Add version macros for 4.2
authorMatthias Clasen <mclasen@redhat.com>
Mon, 11 Jan 2021 23:17:59 +0000 (18:17 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 19 Jan 2021 04:10:18 +0000 (23:10 -0500)
These will be needed for adding new API.

gdk/gdkversionmacros.h.in

index 3c6d6fbf0592e952df6ec85e6ab8533ec062ebb4..b6d0960a7fec12f6ec5309d0052e66d4fab5908b 100644 (file)
  */
 #define GDK_VERSION_4_0        (G_ENCODE_VERSION (4, 0))
 
+/**
+ * GDK_VERSION_4_2:
+ *
+ * A macro that evaluates to the 4.2 version of GDK, in a format
+ * that can be used by the C pre-processor.
+ */
+#define GDK_VERSION_4_2        (G_ENCODE_VERSION (4, 2))
+
 
 /* evaluates to the current stable version; for development cycles,
  * this means the next stable target, with a hard backstop to the
 # define GDK_DEPRECATED_IN_4_0_FOR(f)           _GDK_EXTERN
 #endif
 
+
+#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_4_2
+# define GDK_AVAILABLE_IN_4_2                   GDK_UNAVAILABLE(4, 2)
+#else
+# define GDK_AVAILABLE_IN_4_2                   _GDK_EXTERN
+#endif
+
+#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_4_2
+# define GDK_DEPRECATED_IN_4_2                  GDK_DEPRECATED
+# define GDK_DEPRECATED_IN_4_2_FOR(f)           GDK_DEPRECATED_FOR(f)
+#else
+# define GDK_DEPRECATED_IN_4_2                  _GDK_EXTERN
+# define GDK_DEPRECATED_IN_4_2_FOR(f)           _GDK_EXTERN
+#endif
+
 #endif  /* __GDK_VERSION_MACROS_H__ */